package com.dongyun.loraweb.json;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import com.alibaba.fastjson.JSON;

public class TreeTest {
	public static void main(String[] args) {
		List<Tree> list=new ArrayList<>();
		Tree tree = new Tree();
		tree.setText("停车场管理");
		tree.setIconCls("icon-add");
		Tree c1 = new Tree();
		HashMap<String, String> map = new HashMap<>();
		map.put("url", "/loginUser");
		c1.setAttributes(map);
		c1.setText("停车场设置");
		c1.setIconCls("icon-add");
		tree.setChildren(new ArrayList<>());
		tree.getChildren().add(c1);
		list.add(tree);
		String string = JSON.toJSONString(list);
		System.out.println(string);
	}
}
